#ifndef PLAYERS_H_
#define PLAYERS_H_

#include <map>
#include <vector>
#include <string>
#include <tr1/memory>
#include "Players.h"
#include "Player.h"
#include "Color.h"
#include "Position.h"

typedef std::vector<int> PlayerIds;

class Players
{
public:
    Players();
    virtual ~Players();

    void add(int playerId, std::string playerName);
    void remove(int playerId);
    PlayerPtr getPlayer(int playerId);
    Position getPlayerPosition(int playerId, unsigned int widthOfWell);
    size_t getNumberOfPlayers();
    size_t getNumberOfReadyPlayers();
    Color getPlayerColor(int playerNr);
    PlayerIds getPlayerIds();

private:
    Colors getUsedColors();
    typedef std::map<int, PlayerPtr> PlayerMap;
    PlayerMap players;
};

typedef std::tr1::shared_ptr<Players> PlayersPtr;

#endif
